# 封装员工操作断言
from api.emp_insert_api import *


def common_assert_emp(status_code,success,code,message,resp):
    assert status_code == resp.status_code
    assert success == resp.json().get('success')
    assert code == resp.json().get('code')
    assert message in resp.json().get('message')


if __name__ == '__main__':
    resp = emp_insert.ihrm_emp_insert('张大大33','13443857432','12343554')
    print(resp.json())
    common_assert_emp(200,False,20002,'失败',resp)